package com.codeying.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.codeying.component.excel.ExcelCell;
import java.util.Date;
import java.util.List;

import java.io.Serializable;
/** 我的题库实体类 */
@TableName("tb_questionBank")
public class QuestionBank implements Serializable {

  /** 我的题库主键 */
  @TableId private String id;

  /** 用户 */
  @TableField("userid")
  @ExcelCell(index = 2) // 导出excel用
  private String userid;

  @TableField(exist = false)
  private User useridFrn;
  /** 题目名 */
  @TableField("name")
  @ExcelCell(index = 3) // 导出excel用
  private String name;

  /** 题目内容 */
  @TableField("content")
  @ExcelCell(index = 4) // 导出excel用
  private String content;

  /** 题目答案 */
  @TableField("answer")
  @ExcelCell(index = 5) // 导出excel用
  private String answer;

  /** 知识点 */
  @TableField("labels")
  @ExcelCell(index = 6) // 导出excel用
  private String labels;

  @Override
  public String toString() {
    return "{" +
            ", 题目='" + name + '\'' +
            ", 题目内容='" + content + '\'' +
            ", 答案='" + answer + '\'' +
            ", 知识点='" + labels + '\'' +
            '}';
  }

  /** 创建时间 */
  @TableField("createtime")
  @ExcelCell(index = 7) // 导出excel用
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createtime;

  @TableField(exist = false)
  private String avatar;

  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public String getUserid() {
    return userid;
  }

  public void setUserid(String userid) {
    this.userid = userid;
  }

  public User getUseridFrn() {
    return useridFrn;
  }

  public void setUseridFrn(User v) {
    this.useridFrn = v;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getContent() {
    return content;
  }

  public void setContent(String content) {
    this.content = content;
  }

  public String getAnswer() {
    return answer;
  }

  public void setAnswer(String answer) {
    this.answer = answer;
  }

  public String getLabels() {
    return labels;
  }

  public void setLabels(String labels) {
    this.labels = labels;
  }

  public Date getCreatetime() {
    return createtime;
  }

  public void setCreatetime(Date createtime) {
    this.createtime = createtime;
  }
}

